<HTML>
<HEAD>
<TITLE>Bug Squasher 3.6</TITLE>
<SCRIPT SRC="parameters.js">
</SCRIPT>
<SCRIPT SRC="cache.js">
</SCRIPT>
<SCRIPT>
//customizable variables

/* minesweeper level stats:
      beginner: rows=9, cols=9, total_bugs=10
      intermediate: rows=16, cols=16, total_bugs=40
      expert: rows=16, cols=30, total_bugs=99
*/
var rows=getParamVal("rows"); //we want rows>=9 && rows<=16
var cols=getParamVal("cols"); //we want cols>=9 && cols<=30
var total_bugs=getParamVal("bugs"); //we want total_bugs<=(rows-1)*(cols-1) && total_bugs>=16
var custom_game=eval(getParamVal("custom")); //true if using custom rows, cols, and total_bugs
var pic_size=21; //size of images (pic_size x pic_size)
var pic_offset=0; //number of pictures before the board
</SCRIPT>
<SCRIPT SRC="cookies.js">
</SCRIPT>
<SCRIPT SRC="bugsquasher.js">
</SCRIPT>
</HEAD>
<BODY onLoad="page_load();" VLINK="blue" ALINK="blue">
<FORM NAME="info">
<TABLE WIDTH="100%"><TR>
<SCRIPT>
document.writeln('<TD WIDTH="33%" ALIGN=LEFT><INPUT TYPE=TEXT NAME="bugs_left" SIZE=3 VALUE="'+total_bugs+'"> bugs left to squish</TD>');
</SCRIPT>
<TD WIDTH="34%" ALIGN=CENTER><INPUT TYPE=BUTTON NAME="runner" VALUE="New Game" onClick="run();"></TD>
<TD WIDTH="33%" ALIGN=RIGHT>seconds: <INPUT TYPE=TEXT NAME="time" SIZE=3 VALUE=""></TD>
</TR><TR>
<TD WIDTH="33%" ALIGN=LEFT VALIGN=BOTTOM><A HREF="javascript:high_scores();" onFocus="this.blur();">High Scores</A></TD>
<TD WIDTH="34%" ALIGN=CENTER VALIGN=BOTTOM>&nbsp;</TD>
<TD WIDTH="33%" ALIGN=RIGHT VALIGN=BOTTOM><A HREF="javascript:help();" onFocus="this.blur();">Game Help</A></TD>
</TR></TABLE>
</FORM>
<CENTER>
<TABLE CELLPADDING=0 CELLSPACING=1 BORDER=1>
<SCRIPT>
for(var i=0;i<rows;i++) {
  document.writeln("<TR>");
  for(var j=0;j<cols;j++)
    document.writeln('<TD ALIGN=CENTER VALIGN=MIDDLE><A HREF="javascript:left_click('+i+','+j+');" onMouseUp="right_click(event,'+i+','+j+');"><IMG SRC="'+img_dir+'/blank.gif" HEIGHT='+pic_size+' WIDTH='+pic_size+' BORDER=0></A></TD>');
  document.writeln("</TR>");
}
</SCRIPT>
</TABLE>
</CENTER>
</BODY>
</HTML>
